﻿@{
    Layout = "~/Views/Shared/_LayoutSpeical2.cshtml";
}

<link href="~/Content/icons/icon-hamburg.css" rel="stylesheet" />
<link href="~/Content/icons/icon-standard.css" rel="stylesheet" />
<link href="~/Content/icons/icon-other.css" rel="stylesheet" />


<div class="easyui-layout" data-options="fit:true">
    @*<div data-options="region:'west',split:true,collapsible:false"
         title="导航" style="width: 20%; padding: 0px">
        <a id="btn1" class="easyui-linkbutton">打开dialog</a>
    </div>*@
    <div data-options="region:'center'">
        <div id="grid"></div>
    </div>
</div>


<script>
    $(function () {
        console.log("####");
        console.log(new Date());
        //$.get("/Jsons/fenxi.json", function (data) {
        //    console.log("%%%%");
        //    console.log(new Date());
        //});


        //return;
        $.get("/Jsons/fenxi.json", function (data) {
            console.log("####");
            var columns = [[{ "field": "ccode", "title": "科目编码", "rowspan": 2, "width": 100 }, { "field": "ccode_name", "title": "科目名称", "rowspan": 2, "width": 100 }, { "field": "fxtype", "title": "统计方式", "rowspan": 2, "width": 100 }, { "title": "合计", "colspan": 2, "width": 120 }, { "title": "01   综合办", "width": 80, "align": "center" }, { "title": "0101   sdf", "width": 100, "align": "center" }, { "title": "010101   sdff", "width": 130, "align": "center" }, { "title": "02   人力资源部", "width": 100, "align": "center" }, { "title": "0201   人力资源办", "width": 120, "align": "center" }, { "title": "0202   员工食堂", "width": 110, "align": "center" }, { "title": "0203   员工宿舍", "width": 110, "align": "center" }, { "title": "03   财务部", "width": 80, "align": "center" }, { "title": "0301   财务办", "width": 100, "align": "center" }, { "title": "0302   采购部", "width": 100, "align": "center" }, { "title": "0303   物料仓", "width": 100, "align": "center" }, { "title": "0304   酒水仓", "width": 100, "align": "center" }, { "title": "0305   食品仓", "width": 100, "align": "center" }, { "title": "04   工程部", "width": 80, "align": "center" }, { "title": "0401   工程办", "width": 100, "align": "center" }, { "title": "0402   IT信息部", "width": 120, "align": "center" }, { "title": "05   安保部", "width": 80, "align": "center" }, { "title": "0501   安全部", "width": 100, "align": "center" }, { "title": "0502   安全生产部", "width": 120, "align": "center" }, { "title": "06   市场营销部", "width": 100, "align": "center" }, { "title": "0601   市场营销(停用)", "width": 150, "align": "center" }, { "title": "0602   市场公关部", "width": 120, "align": "center" }, { "title": "0603   销售部", "width": 100, "align": "center" }, { "title": "07   客房部", "width": 80, "align": "center" }, { "title": "0701   管家部办公室", "width": 130, "align": "center" }, { "title": "0702   洗衣布草房", "width": 120, "align": "center" }, { "title": "0703   制服房", "width": 100, "align": "center" }, { "title": "0704   物业-PA", "width": 120, "align": "center" }, { "title": "0705   迷你吧", "width": 100, "align": "center" }, { "title": "0706   楼层", "width": 90, "align": "center" }, { "title": "08   前厅部", "width": 80, "align": "center" }, { "title": "0801   前厅办", "width": 100, "align": "center" }, { "title": "0802   商务中心", "width": 110, "align": "center" }, { "title": "0803   车队", "width": 90, "align": "center" }, { "title": "0804   礼宾部", "width": 100, "align": "center" }, { "title": "0805   总机", "width": 90, "align": "center" }, { "title": "09   餐饮部", "width": 80, "align": "center" }, { "title": "0901   餐饮办", "width": 100, "align": "center" }, { "title": "0902   餐厅办", "width": 100, "align": "center" }, { "title": "090201   中餐厅", "width": 120, "align": "center" }, { "title": "090202   西餐厅", "width": 120, "align": "center" }, { "title": "090203   大堂吧", "width": 120, "align": "center" }, { "title": "090204   宴会厅", "width": 120, "align": "center" }, { "title": "090205   送餐部", "width": 120, "align": "center" }, { "title": "0903   厨房", "width": 90, "align": "center" }, { "title": "090301   厨房(酒店)", "width": 150, "align": "center" }, { "title": "09030101   中厨房（酒店）", "width": 180, "align": "center" }, { "title": "09030102   西厨房（酒店）", "width": 180, "align": "center" }, { "title": "09030103   包饼房（酒店）", "width": 180, "align": "center" }, { "title": "09030104   宴会厨房（酒店）", "width": 190, "align": "center" }, { "title": "090302   厨房(主楼)", "width": 150, "align": "center" }, { "title": "09030201   中厨房（主楼）", "width": 180, "align": "center" }, { "title": "09030202   西厨房（主楼）", "width": 180, "align": "center" }, { "title": "09030203   包饼房（主楼）", "width": 180, "align": "center" }, { "title": "09030204   宴会厨房(主体）", "width": 190, "align": "center" }, { "title": "09030205   婚宴厨房（主体）", "width": 190, "align": "center" }, { "title": "09030206   会议盒饭(主体）", "width": 190, "align": "center" }, { "title": "09030207   流动售卖（主体中厨）", "width": 210, "align": "center" }, { "title": "09030208   流动售卖盒饭(主体）", "width": 210, "align": "center" }, { "title": "09030209   会议茶歇（主体）", "width": 190, "align": "center" }, { "title": "09030210   流动售卖(主体西厨）", "width": 210, "align": "center" }, { "title": "0904   管事部", "width": 100, "align": "center" }, { "title": "10   康乐部", "width": 80, "align": "center" }, { "title": "1003   健身", "width": 90, "align": "center" }, { "title": "11   固定费用", "width": 90, "align": "center" }, { "title": "12   筹备部", "width": 80, "align": "center" }, { "title": "13   运营部", "width": 80, "align": "center" }, { "title": "14   旅游服务部", "width": 100, "align": "center" }, { "title": "15   能源部", "width": 80, "align": "center" }, { "title": "1501   酒店", "width": 90, "align": "center" }, { "title": "1502   主体", "width": 90, "align": "center" }, { "title": "16   服务质量管理部", "width": 120, "align": "center" }, { "title": "25   23rsdf", "width": 110, "align": "center" }, { "title": "51   展览厅（会展）", "width": 120, "align": "center" }, { "title": "5101   sdfsdfsd", "width": 150, "align": "center" }, { "title": "52   会议室（会展）", "width": 120, "align": "center" }, { "title": "53   餐饮部（会展）", "width": 120, "align": "center" }, { "title": "5301   多功能厅宴会厅", "width": 140, "align": "center" }, { "title": "5302   流动售卖车", "width": 120, "align": "center" }, { "title": "5303   会议盒饭", "width": 110, "align": "center" }, { "title": "5304   会展-季节性销售", "width": 150, "align": "center" }, { "title": "5305   宴会婚宴", "width": 110, "align": "center" }, { "title": "5306   流动售卖车盒饭", "width": 140, "align": "center" }, { "title": "5307   会议茶歇", "width": 110, "align": "center" }, { "title": "54   其他营业部门（会展）", "width": 150, "align": "center" }, { "title": "5401   电话房（会展）", "width": 140, "align": "center" }, { "title": "5402   商务中心（会展）", "width": 150, "align": "center" }, { "title": "5403   交通/车队（会展）", "width": 160, "align": "center" }, { "title": "5404   停车场（会展）", "width": 140, "align": "center" }, { "title": "5405   零售（会展）", "width": 130, "align": "center" }, { "title": "5406   写字楼（会展）", "width": 140, "align": "center" }, { "title": "540601   是的方式地方", "width": 150, "align": "center" }, { "title": "55   sdfff", "width": 100, "align": "center" }], [{ "field": "bproperty", "title": "方向", "width": 30, "align": "center" }, { "field": "hj", "title": "金额", "width": 100, "align": "right", "halign": "center" }, { "field": "bm1", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm2", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm3", "width": 130, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm4", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm5", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm6", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm7", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm8", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm9", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm10", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm11", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm12", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm13", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm14", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm15", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm16", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm17", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm18", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm19", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm20", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm21", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm22", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm23", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm24", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm25", "width": 130, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm26", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm27", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm28", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm29", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm30", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm31", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm32", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm33", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm34", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm35", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm36", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm37", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm38", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm39", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm40", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm41", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm42", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm43", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm44", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm45", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm46", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm47", "width": 180, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm48", "width": 180, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm49", "width": 180, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm50", "width": 190, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm51", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm52", "width": 180, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm53", "width": 180, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm54", "width": 180, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm55", "width": 190, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm56", "width": 190, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm57", "width": 190, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm58", "width": 210, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm59", "width": 210, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm60", "width": 190, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm61", "width": 210, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm62", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm63", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm64", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm65", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm66", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm67", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm68", "width": 100, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm69", "width": 80, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm70", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm71", "width": 90, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm72", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm73", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm74", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm75", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm76", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm77", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm78", "width": 140, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm79", "width": 120, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm80", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm81", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm82", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm83", "width": 140, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm84", "width": 110, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm85", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm86", "width": 140, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm87", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm88", "width": 160, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm89", "width": 140, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm90", "width": 130, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm91", "width": 140, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm92", "width": 150, "align": "right", "title": "金额", "halign": "center" }, { "field": "bm93", "width": 100, "align": "right", "title": "金额", "halign": "center" }]];
            console.log(data);
            console.log("%%%%");
            console.log(columns);

            var newColumns1 = columns[0];
            var newColumns2 = $.array.map(columns[1], function (item) {
                if (item.title != "金额") { return item; }
                return $.extend(item, { title: item.field + item.title });
            });

            var newColumns = [];
            newColumns.push(newColumns1);
            newColumns.push(newColumns2);


            $("#grid").datagrid({
                fit: true,
                //height: "100%",
                //width: document.documentElement.clientWidth,
                showHeader: true, showFooter: true,
                fixed: true,
                data: data, columns: newColumns
            });
        });
    });
</script>